<?php

/*
 * Action - Attack - Knight 5$
 *
 * +2 cards
 * Each other player reveals the top 2 cards of his deck, trashes one of them costing from 3 Coin to 6 Coin, and discards the rest. If a Knight is trashed by this, trash this card.
 */

class SirDestry extends Card implements iAction, iKingdom, iDarkAges, iKnight, iAttack {

    public function __construct() {
        parent::__construct("Sir Destry", 5);
        $this->undoPlay = false;
        $this->undoBuy = false;
    }

    public function getDescription() {
        return array(
            "+2 cards",
            "Each other player reveals the top 2 cards of his deck, trashes one of them costing from 3 Coin to 6 Coin, and discards the rest. If a Knight is trashed by this, trash this card.");
    }

    public function play(Game $game, $isRealCard) {
        $game->attack($this);
        
        $drawed_cards = $game->drawCards(2);
        ScreenDisplay::addScreenMessage($game, true, "draw ".  nicePrint($drawed_cards), "draws ".sizeof($drawed_cards)." cards");
        
        $knight = new Knights();
        $knight->knightAttack($game, $this);
        $game->cardActionFinished();
    }

}

?>